﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace EFong.Contract
{
    [DataContract]
    public class RFlightChange
    {
        [DataMember]
        public Guid ID { get; set; }    

        private DateTime _orderDate = DateTime.Now;
        [DataMember]
        public DateTime OrderDate
        {
            get { return _orderDate; }
            set { _orderDate = value; }
        }


        private string _passengerCName = string.Empty;
        [DataMember]
        public string PassengerCName
        {
            get { return _passengerCName; }
            set { _passengerCName = value; }
        }

        private string _passengerEName = string.Empty;
        [DataMember]
        public string PassengerEName
        {
            get { return _passengerEName; }
            set { _passengerEName = value; }
        }

        public string PassengerText
        {
            get
            {
                StringBuilder sb = new StringBuilder();
                if (!string.IsNullOrWhiteSpace(PassengerCName))
                {
                    sb.Append(PassengerCName);
                    if (!string.IsNullOrWhiteSpace(PassengerEName))
                    {
                        sb.Append(string.Format("({0}", PassengerEName));
                    }

                }
                else
                {
                    sb.Append(PassengerEName);
                }

                return sb.ToString();
            }
        }

        private decimal _price;
        [DataMember]
        public decimal Price
        {
            get { return _price; }
            set { _price = value; }
        }

        private decimal _vendorPrice;
        [DataMember]
        public decimal VendorPrice
        {
            get { return _vendorPrice; }
            set { _vendorPrice = value; }
        }
    }
}
